# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=okteta
pkgver=0.25.4
pkgrel=1
epoch=1
pkgdesc='KDE hex editor for viewing and editing the raw data of files'
url='https://kde.org/applications/utilities/okteta/'
arch=(x86_64)
license=(GPL LGPL FDL)
depends=(kcmutils kparts knewstuff qca hicolor-icon-theme)
makedepends=(extra-cmake-modules kdoctools qt5-tools)
source=("https://download.kde.org/stable/$pkgname/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig})
sha256sums=('ae2a72d0162184278d1c0e0a73b52751a0181deede0231a4c9d568bb7ac82a52'
            'SKIP')
validpgpkeys=(E191FD5BE6F46870F09E82B2024E7FB43D015474)  # Friedrich W. H. Kossebau <kossebau@kde.org>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DBUILD_TESTING=OFF
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
